package com.gitee.easypoi.entity.excel;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 开发人员   YooLin1c
 * 编写日期   2018/7/18
 * 联系邮箱   401664157@qq.com
 * 作用描述
 */
@Data
@ExcelTarget(value = "Order")
public class OrderExcelEntity {
    @Excel(name = "订单号")
    private String orderId;
    @ExcelCollection(name = "订单明细", orderNum = "1")
    private List<OrderItemExcelEntity> orderItemList;
    @Excel(name = "下单时间", orderNum = "2", exportFormat = "yyyy-MM-dd HH:mm:ss")
    private Date orderTime;
    @ExcelEntity(name = "收货地址")
    private OrderAddressExcelEntity orderAddress;
    @Excel(name = "订单状态", orderNum = "4", replace = {"已完成_1", "已取消_2"})
    private Integer status;
}
